package com.example.consumer018080.service;

import com.example.consumer018080.bean.Depart;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

//@FeignClient(value = "provider-depart", fallback= DepartFallBackFactory.class)
@FeignClient(value = "provider-depart")
public interface DepartService {
    @PostMapping("/provider/depart/save")
    boolean save(Depart depart);

    @PostMapping("/provider/depart/del")
    boolean del(int id);

    @PostMapping("/provider/depart/update")
    boolean update(Depart depart);

    @GetMapping("/provider/depart/find/{id}")
    Depart query(@PathVariable int id);

    @GetMapping("/provider/depart/findAll")
    List<Depart> findAll();

    @GetMapping("/provider/depart/info")
    String getInfo();

}
